home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / DClap / DDialogText.h < prev    next >
Text File  |  1996-07-05  |  2KB  |  82 lines

  1. // DDialogText.h
  2. // d.g.gilbert
  3.  
  4. #ifndef _DDIALOGTEXT_
  5. #define _DDIALOGTEXT_
  6.  
  7. #include "DView.h"
  8. #include "Dvibrant.h"
  9.  
  10.  
  11. class DDialogText : public DView
  12. {
  13. public:
  14.     Nlm_TexT    fText;
  15.     Nlm_FonT    fFont;
  16.     
  17.     DDialogText(long id, DView* itsSuperior, Nlm_FonT itsFont = NULL);
  18.     virtual ~DDialogText();
  19.     
  20.     virtual Boolean IsMyAction(DTaskMaster* action);  
  21.     
  22.     virtual char* GetText();
  23.     virtual void SetText(char* theText) { DView::SetTitle(theText); }
  24.     virtual void GetSelection( short& begin, short& end) { Nlm_TextSelectionRange( fText, &begin, &end); }
  25.     virtual void SetSelection( short begin, short end)      { Nlm_SelectText( fText, begin, end); }
  26.     virtual void CutText()         { Nlm_CutText( fText); }
  27.     virtual void CopyText()     { Nlm_CopyText( fText); }
  28.     virtual void PasteText()     { Nlm_PasteText( fText); }
  29.     virtual void ClearText()     { Nlm_ClearText( fText); }
  30.     virtual ulong TextLength() { return Nlm_TextLength( fText); }
  31.     virtual void SetMultilineText( Nlm_Boolean turnon);
  32.     
  33.     virtual void selectAction();
  34.     virtual void deselectAction();
  35. };
  36.  
  37. DDialogText* CurrentDialogText();
  38.  
  39.  
  40. class DEditText : public DDialogText
  41. {    
  42. public:
  43.     DEditText(long id, DView* itsSuperior, char* defaulttext, short charwidth = 0, Nlm_FonT font = Nlm_systemFont);
  44. };
  45.  
  46. class DHiddenText : public DDialogText
  47. {    
  48. public:
  49.     DHiddenText(long id, DView* itsSuperior, char* defaulttext, short charwidth = 0, Nlm_FonT font = Nlm_systemFont);
  50.     virtual void tabaction() {}
  51. };
  52.  
  53. class DTextLine : public DDialogText
  54. {    
  55. public:
  56.     DTextLine(long id, DView* itsSuperior, char* defaulttext, short charwidth = 0, Nlm_FonT font = Nlm_systemFont);
  57.     virtual void tabaction() {}
  58. };
  59.  
  60. class DPasswordText : public DDialogText
  61. {    
  62. public:
  63.     DPasswordText(long id, DView* itsSuperior, char* defaulttext, short charwidth = 0, Nlm_FonT font = Nlm_systemFont);
  64. };
  65.  
  66. class DDialogScrollText : public DDialogText
  67. {    
  68. public:
  69.     DDialogScrollText(long id, DView* itsSuperior, short width, short height, 
  70.         Nlm_FonT font, Boolean wrap);
  71. };
  72.  
  73.  
  74.  
  75. inline DDialogText* CurrentDialogText() 
  76. {
  77.     return (DDialogText*) Nlm_GetObject( (Nlm_GraphiC)Nlm_CurrentText());
  78. }
  79.         
  80.  
  81. #endif
  82.